import i18n from '@src/locales';
import FormTextareaSetting from './FormTextareaSetting.vue';
import FormTextareaPreview from './FormTextareaPreview.vue';
import FormTextarea from './FormTextarea.vue'

import TextareaSearch from './extend/TextareaSearch';
import TaskDescriptionSetting from './extend/TaskDescriptionSetting.vue';
import serviceRemarkSetting from './extend/ServiceRemarkSetting.vue';
import FaultLibraryRemarkSetting from './extend/FaultLibraryRemarkSetting.vue';

let FormTextareaField = {
  formType: 'textarea', // 字段类型
  name: i18n.t('common.form.type.textarea'),
  isSystem: 0,
  component: {
    setting: FormTextareaSetting,
    preview: FormTextareaPreview,
    build: FormTextarea,
    extend: {
      'textarea_search': TextareaSearch
    }
  }
};

let TaskDescriptionField = {
  formType: 'description',
  fieldName: 'description',
  name: i18n.t('common.form.type.description'),
  isSystem: 1,
  forceDelete: true,
  component: {
    preview: FormTextareaPreview,
    build: FormTextarea,
    extend: {
      'task_description_setting': TaskDescriptionSetting
    }
  },
}

let ServiceRemarkField = {
  formType: 'serviceRemark',
  fieldName: 'serviceRemark',
  name: i18n.t('common.form.type.serviceRemark'),
  previewIcon:'icon-fuwubeizhu',
  isSystem: 1,
  component: {
    preview: FormTextareaPreview,
    build: FormTextarea,
    extend: {
      remark_serviceRemark_setting: serviceRemarkSetting,
      fault_library_serviceRemark_setting: FaultLibraryRemarkSetting
    }
  },
}


export default [FormTextareaField, TaskDescriptionField, ServiceRemarkField];


